<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>${pageTitle}</title>
<script type="text/javascript" src="/static/jquery-1.12.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	console.log($("#form").serialize());
	$("#ajaxPost").click(function(){
		$.ajax({
			type: "POST",
			//async: ajaxProperties.async,
			dataType: "JSON",
			url: "/json/formRecieve",
			data: $("#form").serialize(),
			success: function(data, status) {
				console.log(data);
			}
		});
	});
})
</script>
</head>
<body>
  <form:form action="list" commandName="form" method='post' autocomplete="off" accept-charset='UTF-8'>
	<table class="autoWidth">
	  <tr>
		<td>版本号：</td>
		<td><form:input path="version" /></td>
	  </tr>
	  <tr>
		<td>时间戳：</td>
		<td><form:input path="timestamp" /></td>
	  </tr>
	  <tr>
		<td>主机名：</td>
		<td><form:input path="host" /></td>
	  </tr>
	  <tr>
		<td>消　息：</td>
		<td><form:input path="message" /></td>
	  </tr>
	  <tr>
		<td colspan="2"><input type="button" id="ajaxPost" value="Ajax提交"></td>
	  </tr>
	</table>
  </form:form>
</body>
</html>